Optimal. Leaf size=361 \[ \frac {2 B i^2 n (b c-a d)^3 \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b^3 d}-\frac {2 B i^2 n (a+b x) (b c-a d)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b^3}-\frac {B i^2 n (c+d x)^2 (b c-a d) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b d}+\frac {i^2 (c+d x)^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{3 d}-\frac {2 B^2 i^2 n^2 (b c-a d)^3 \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )}{3 b^3 d}+\frac {B^2 i^2 n^2 (b c-a d)^3 \log \left (\frac {a+b x}{c+d x}\right )}{3 b^3 d}+\frac {B^2 i^2 n^2 (b c-a d)^3 \log (c+d x)}{b^3 d}+\frac {B^2 i^2 n^2 x (b c-a d)^2}{3 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.54, antiderivative size = 454, normalized size of antiderivative = 1.26, number of steps used = 19, number of rules used = 13, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.371, Rules used = {2525, 12, 2528, 2486, 31, 2524, 2418, 2390, 2301, 2394, 2393, 2391, 43} \[ -\frac {2 B^2 i^2 n^2 (b c-a d)^3 \text {PolyLog}\left (2,-\frac {d (a+b x)}{b c-a d}\right )}{3 b^3 d}-\frac {2 B i^2 n (b c-a d)^3 \log (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b^3 d}-\frac {2 A B i^2 n x (b c-a d)^2}{3 b^2}-\frac {B i^2 n (c+d x)^2 (b c-a d) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 b d}+\frac {i^2 (c+d x)^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{3 d}-\frac {2 B^2 i^2 n (a+b x) (b c-a d)^2 \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{3 b^3}+\frac {B^2 i^2 n^2 x (b c-a d)^2}{3 b^2}+\frac {B^2 i^2 n^2 (b c-a d)^3 \log ^2(a+b x)}{3 b^3 d}+\frac {B^2 i^2 n^2 (b c-a d)^3 \log (a+b x)}{3 b^3 d}+\frac {2 B^2 i^2 n^2 (b c-a d)^3 \log (c+d x)}{3 b^3 d}-\frac {2 B^2 i^2 n^2 (b c-a d)^3 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{3 b^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 43
Rule 2301
Rule 2390
Rule 2391
Rule 2393
Rule 2394
Rule 2418
Rule 2486
Rule 2524
Rule 2525
Rule 2528
Rubi steps
\begin {align*} \int (171 c+171 d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \, dx &=\frac {9747 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d}-\frac {(2 B n) \int \frac {5000211 (b c-a d) (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{a+b x} \, dx}{513 d}\\ &=\frac {9747 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d}-\frac {(19494 B (b c-a d) n) \int \frac {(c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{a+b x} \, dx}{d}\\ &=\frac {9747 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d}-\frac {(19494 B (b c-a d) n) \int \left (\frac {d (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^2}+\frac {(b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^2 (a+b x)}+\frac {d (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b}\right ) \, dx}{d}\\ &=\frac {9747 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d}-\frac {(19494 B (b c-a d) n) \int (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx}{b}-\frac {\left (19494 B (b c-a d)^2 n\right ) \int \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx}{b^2}-\frac {\left (19494 B (b c-a d)^3 n\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{a+b x} \, dx}{b^2 d}\\ &=-\frac {19494 A B (b c-a d)^2 n x}{b^2}-\frac {9747 B (b c-a d) n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b d}-\frac {19494 B (b c-a d)^3 n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 d}+\frac {9747 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d}-\frac {\left (19494 B^2 (b c-a d)^2 n\right ) \int \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx}{b^2}+\frac {\left (9747 B^2 (b c-a d) n^2\right ) \int \frac {(b c-a d) (c+d x)}{a+b x} \, dx}{b d}+\frac {\left (19494 B^2 (b c-a d)^3 n^2\right ) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (a+b x)}{a+b x} \, dx}{b^3 d}\\ &=-\frac {19494 A B (b c-a d)^2 n x}{b^2}-\frac {19494 B^2 (b c-a d)^2 n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b^3}-\frac {9747 B (b c-a d) n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b d}-\frac {19494 B (b c-a d)^3 n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 d}+\frac {9747 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d}+\frac {\left (9747 B^2 (b c-a d)^2 n^2\right ) \int \frac {c+d x}{a+b x} \, dx}{b d}+\frac {\left (19494 B^2 (b c-a d)^3 n^2\right ) \int \frac {1}{c+d x} \, dx}{b^3}+\frac {\left (19494 B^2 (b c-a d)^3 n^2\right ) \int \left (\frac {b \log (a+b x)}{a+b x}-\frac {d \log (a+b x)}{c+d x}\right ) \, dx}{b^3 d}\\ &=-\frac {19494 A B (b c-a d)^2 n x}{b^2}-\frac {19494 B^2 (b c-a d)^2 n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b^3}-\frac {9747 B (b c-a d) n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b d}-\frac {19494 B (b c-a d)^3 n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 d}+\frac {9747 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d}+\frac {19494 B^2 (b c-a d)^3 n^2 \log (c+d x)}{b^3 d}+\frac {\left (9747 B^2 (b c-a d)^2 n^2\right ) \int \left (\frac {d}{b}+\frac {b c-a d}{b (a+b x)}\right ) \, dx}{b d}-\frac {\left (19494 B^2 (b c-a d)^3 n^2\right ) \int \frac {\log (a+b x)}{c+d x} \, dx}{b^3}+\frac {\left (19494 B^2 (b c-a d)^3 n^2\right ) \int \frac {\log (a+b x)}{a+b x} \, dx}{b^2 d}\\ &=-\frac {19494 A B (b c-a d)^2 n x}{b^2}+\frac {9747 B^2 (b c-a d)^2 n^2 x}{b^2}+\frac {9747 B^2 (b c-a d)^3 n^2 \log (a+b x)}{b^3 d}-\frac {19494 B^2 (b c-a d)^2 n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b^3}-\frac {9747 B (b c-a d) n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b d}-\frac {19494 B (b c-a d)^3 n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 d}+\frac {9747 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d}+\frac {19494 B^2 (b c-a d)^3 n^2 \log (c+d x)}{b^3 d}-\frac {19494 B^2 (b c-a d)^3 n^2 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^3 d}+\frac {\left (19494 B^2 (b c-a d)^3 n^2\right ) \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,a+b x\right )}{b^3 d}+\frac {\left (19494 B^2 (b c-a d)^3 n^2\right ) \int \frac {\log \left (\frac {b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{b^2 d}\\ &=-\frac {19494 A B (b c-a d)^2 n x}{b^2}+\frac {9747 B^2 (b c-a d)^2 n^2 x}{b^2}+\frac {9747 B^2 (b c-a d)^3 n^2 \log (a+b x)}{b^3 d}+\frac {9747 B^2 (b c-a d)^3 n^2 \log ^2(a+b x)}{b^3 d}-\frac {19494 B^2 (b c-a d)^2 n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b^3}-\frac {9747 B (b c-a d) n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b d}-\frac {19494 B (b c-a d)^3 n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 d}+\frac {9747 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d}+\frac {19494 B^2 (b c-a d)^3 n^2 \log (c+d x)}{b^3 d}-\frac {19494 B^2 (b c-a d)^3 n^2 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^3 d}+\frac {\left (19494 B^2 (b c-a d)^3 n^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{b^3 d}\\ &=-\frac {19494 A B (b c-a d)^2 n x}{b^2}+\frac {9747 B^2 (b c-a d)^2 n^2 x}{b^2}+\frac {9747 B^2 (b c-a d)^3 n^2 \log (a+b x)}{b^3 d}+\frac {9747 B^2 (b c-a d)^3 n^2 \log ^2(a+b x)}{b^3 d}-\frac {19494 B^2 (b c-a d)^2 n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b^3}-\frac {9747 B (b c-a d) n (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b d}-\frac {19494 B (b c-a d)^3 n \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 d}+\frac {9747 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d}+\frac {19494 B^2 (b c-a d)^3 n^2 \log (c+d x)}{b^3 d}-\frac {19494 B^2 (b c-a d)^3 n^2 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^3 d}-\frac {19494 B^2 (b c-a d)^3 n^2 \text {Li}_2\left (-\frac {d (a+b x)}{b c-a d}\right )}{b^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.27, size = 303, normalized size = 0.84 \[ \frac {i^2 \left ((c+d x)^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2-\frac {B n (b c-a d) \left (b^2 (c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+2 (b c-a d)^2 \log (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+2 A b d x (b c-a d)+2 B d (a+b x) (b c-a d) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-B n (b c-a d)^2 \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \text {Li}_2\left (\frac {d (a+b x)}{a d-b c}\right )\right )-2 B n (b c-a d)^2 \log (c+d x)-B n (b c-a d) ((b c-a d) \log (a+b x)+b d x)\right )}{b^3}\right )}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.02, size = 0, normalized size = 0.00 \[ {\rm integral}\left (A^{2} d^{2} i^{2} x^{2} + 2 \, A^{2} c d i^{2} x + A^{2} c^{2} i^{2} + {\left (B^{2} d^{2} i^{2} x^{2} + 2 \, B^{2} c d i^{2} x + B^{2} c^{2} i^{2}\right )} \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right )^{2} + 2 \, {\left (A B d^{2} i^{2} x^{2} + 2 \, A B c d i^{2} x + A B c^{2} i^{2}\right )} \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ), x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.30, size = 0, normalized size = 0.00 \[ \int \left (d i x +c i \right )^{2} \left (B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )+A \right )^{2}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 6.46, size = 1473, normalized size = 4.08 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (c\,i+d\,i\,x\right )}^2\,{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________